package com.codeplex.boomships.communication;

import java.io.Serializable;

public class Msg<T> implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	//Accion a realizar.
	private Command command;
	
	//Remitente del mensaje.
	private String sender;
	
	//Parametros.
	private T param;
		
	//Getters y Setters.
	public Command getCommand() {
		return command;
	}

	public void setCommand(Command command) {
		this.command = command;
	}

	public String getSender(){
		return sender;
	}
	
	public void setSender(String sender){
		this.sender = sender;
	}
	
	public T getParam() {
		return param;
	}

	public void setParam(T param) {
		this.param = param;
	}

	//Constructores.
	public Msg(){}
	
	public Msg(Command comm){
		this.command = comm;
	}
	public Msg(Command comm, T obj){
		this.command = comm;
		this.param = obj;
	}
	public Msg(Command comm, T obj, String sender){
		this.command = comm;
		this.param = obj;
		this.sender = sender;
	}

}
